<template>
	<!-- 动态风险管控 -->
	<view class="p-10">
		<view class="card" v-for="(item,index) in data">
			<view class="title fw">
				{{item.title}}
			</view>
			<view class="flex m-between s-center">
				<view class="flex-col">
					<text class="m-t-8">危险因素/项目：{{item.type}}</text>
					<text class="m-t-8">风险等级：{{item.grade}}</text>
				</view>
				<view class="" @click="goDetail(item)">
					<up-text type="primary" text="去管控"></up-text>
				</view>
			</view>
		</view>
	</view>
</template>
<script setup>
	import {
		reactive
	} from "vue";
	let data = reactive([{
		title: '测试',
		type: '冲击地压-冲击地压防治',
		grade: '低风险'
	}])
	const goDetail = (item) => {
		uni.navigateTo({
			url: '/pages/professional/main/dynamicRisk/detail?data=' + JSON.stringify(item)
		})
	}
</script>
<style lang="scss" scoped>
	.card {
		padding: 20rpx;
		background-color: #fff;
		border-radius: 20rpx;
		margin-top: 20rpx;

		&:first-child {
			margin-top: 0;
		}
	}
</style>